<?php  if ( ! defined('BASEPATH')) exit('No direct script access allowed');

global $route;

// Cms Category Routers
$route['tin-tuc'] = 'article/article/home';
$route['tin-tuc/(:any)-c(:num)'] = 'article/article/category/$2';
$route['tin-tuc/(:any)-a(:num)'] = 'article/article/index/$2';

// Cms Article Routers
$route['tin-tuc/(:any)-a(:num)'] = 'article/article/index/$2';

// General Routers
$route['default_controller'] = "home/home";
$route['404_override'] = '';
$route['admin/(:any)'] = 'admin/$1';
$route['index'] = 'home_page/home/index';
$route['list'] = 'home_page/home/list_news';
$route['benh/(:any)-ds(:num)'] = 'home_page/detail_disease/index/$2'; //chi tiết bệnh
$route['trieu-chung/(:any)-st(:num)'] = 'home_page/detail_symptom/index/$2'; //chi tiết triệu chứng

$route['(:any)-dp(:num)'] = 'home_page/list_disease/index/$2'; //khoa cũng là danh mục của bệnh
$route['(:any)-dp(:num)-trang(:num)'] = 'home_page/list_disease/index/$2/$3';

$route['(:any)-ca(:num)'] = 'home_page/list_article/index/$2'; //danh mục tin tức
$route['(:any)-ca(:num)-trang(:num)'] = 'home_page/list_article/index/$2/$3';

$route['(:any)-a(:num)'] = 'home_page/detail_article/index/$2'; //chi tiết tin tức

$route['checkout/cart/(:any)'] = 'checkout/cart/$1';

// Account Sign In Routers
$route['tai-khoan/dang-nhap'] = 'customer/signin';
$route['tai-khoan/dang-nhap/kiem-tra'] = 'customer/signin/login';
$route['tai-khoan/thoat'] = 'customer/signin/logout';

// Account Sign Up Routers
$route['tai-khoan/dang-ky'] = 'customer/signup';
$route['tai-khoan/dang-ky/cap-nhat'] = 'customer/signup/register';

// Account Info Routers
$route['tai-khoan/trang-chu'] = 'customer/account';
$route['tai-khoan/cap-nhat'] = 'customer/account/save';

// Account Address Routers
$route['tai-khoan/dia-chi'] = 'customer/address';
$route['tai-khoan/dia-chi/chinh-sua'] = 'customer/address/edit';
$route['tai-khoan/dia-chi/chinh-sua/id/(:any)'] = 'customer/address/edit/id/$1';
$route['tai-khoan/dia-chi/luu-lai'] = 'customer/address/save';
$route['tai-khoan/dia-chi/xoa-dia-chi/id/(:any)'] = 'customer/address/delete/id/$1';
$route['customer/address/ajax_get_districts'] = 'customer/address/ajax_get_districts';

$route['tim-kiem/(:any)/(:any)'] = 'search/index/$1/$2';
$route['(:any)-p(:num)'] = 'product/index/$1/$2/$3';
$route['(:any)'] = 'category/index/$1';
